namespace devtm.Aop.Emit
{
    using System;
    

    [Serializable]
    public class TryCatchFinallyStatement : EmitStatement
    {

        private CatchClauseCollection catchClauses;
        private EmitStatementCollection finallyStatments;
        private EmitStatementCollection tryStatments;


        public TryCatchFinallyStatement()
        {
            this.tryStatments = new EmitStatementCollection();
            this.finallyStatments = new EmitStatementCollection();
            this.catchClauses = new CatchClauseCollection();
        }


        public TryCatchFinallyStatement(EmitStatement[] tryStatements, EmitCatchClause[] catchClauses)
        {
            this.tryStatments = new EmitStatementCollection();
            this.finallyStatments = new EmitStatementCollection();
            this.catchClauses = new CatchClauseCollection();
            this.TryStatements.AddRange(tryStatements);
            this.CatchClauses.AddRange(catchClauses);
        }


        public TryCatchFinallyStatement(EmitStatement[] tryStatements, EmitCatchClause[] catchClauses, EmitStatement[] finallyStatements)
        {
            this.tryStatments = new EmitStatementCollection();
            this.finallyStatments = new EmitStatementCollection();
            this.catchClauses = new CatchClauseCollection();
            this.TryStatements.AddRange(tryStatements);
            this.CatchClauses.AddRange(catchClauses);
            this.FinallyStatements.AddRange(finallyStatements);
        }


        public CatchClauseCollection CatchClauses
        {
            get
            {
                return this.catchClauses;
            }
        }


        public EmitStatementCollection FinallyStatements
        {
            get
            {
                return this.finallyStatments;
            }
        }


        public EmitStatementCollection TryStatements
        {
            get
            {
                return this.tryStatments;
            }
        }


    }
}
